
/**
 * Project Name:cats-zcjc
 * File Name:Station.java
 * Package Name:com.catsic.zcjc.entity
 * Date:2017年10月26日下午4:24:18
 * Copyright (c) 2017, oa.catsic.com All Rights Reserved.
 */

package com.catsic.zcjc.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.catsic.base.BaseEntity;

/**
 * ClassName: EquipFileData 
 * Description: 维护记录附件实体类
 * date: 2017年10月26日 下午4:24:18
 * author: xietiebing
 */
@Entity
@Table(name = "T_MAINTAIN_DATA_FILE")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class MaintainDataFile extends BaseEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6570776338207616422L;

	/**
	 * filePath:文件路径
	 */
	@Column(name = "FILE_PATH")
	private String filePath;

	/**
	 * fileName:文件名称
	 */
	@Column(name = "FILE_NAME")
	private String fileName;

	/**
	 * fileDesc:内容简介
	 */
	@Column(name = "FILE_DESC")
	private String fileDesc;

	/**
	 * type:1:照片、2:补丁、3:其他
	 */
	@Column(name = "TYPE")
	private Integer type;

	/**
	 * equipData:所属设备数据
	 */
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "DATA_ID", referencedColumnName = "ID")
	private EquipMaintain maintainData;

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileDesc() {
		return fileDesc;
	}

	public void setFileDesc(String fileDesc) {
		this.fileDesc = fileDesc;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public EquipMaintain getMaintainData() {
		return maintainData;
	}

	public void setMaintainData(EquipMaintain maintainData) {
		this.maintainData = maintainData;
	}

	@Override
	public String toString() {
		return "MaintainDataFile [filePath=" + filePath + ", fileName=" + fileName + ", fileDesc=" + fileDesc
				+ ", type=" + type + ", maintainData=" + maintainData + "]";
	}

}
